//
//  NSDateFormatter+Extension.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/26.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "NSDateFormatter+Extension.h"

@implementation NSDateFormatter (Extension)

+ (instancetype)dateFormatterWithFmt:(NSString *)fmtStr {
    NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
    [fmt setDateFormat:fmtStr];
    return fmt;
}

+ (NSString *)nowTimeWithFmt:(NSString *)fmtStr {
    NSDateFormatter *fmt = [self dateFormatterWithFmt:fmtStr];
    return [fmt stringFromDate:[NSDate date]];
}

@end
